package lee.meiriyiti.day1118;

import java.util.ArrayList;
import java.util.Scanner;

public class TestDemo1118_1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String string = scanner.nextLine();
            int max = 0, count = 0, end = 0;
            for (int i = 0; i < string.length(); i++) {
                if ('0' <= string.charAt(i) && string.charAt(i) <= '9') {
                    count++;
                    if (count > max) {
                        max = count;
                        end = i;
                    }
                } else {
                        count = 0;
                    }
            }
            System.out.println(string.substring(end - max + 1, end + 1));
        }
    }
}
